<!--
 * @Descripttion: 
 * @version: 
 * @Author: cyj
 * @Date: 2022-12-08 21:09:08
-->
<template>
    <div class="discover">
        <!-- 轮播图 -->
        <Banner :banner="discover.bannerList"></Banner>
        <!-- 推荐歌单 -->
        <Personalized :personalized="discover.personalized"></Personalized>
        <!-- 独家放送 -->
        <PrivateContentVue :privateContent="discover.privateContent"></PrivateContentVue>
        <!-- 最新音乐 -->
        <NewSongsVue :newSongList="discover.newSongList"></NewSongsVue>
        <!-- 推荐MV -->
        <RecMVVue :newMVList="discover.newMvList"></RecMVVue>

    </div>
</template>

<script setup>
import Banner from '../discover/children/Banner.vue'
import Personalized  from '../discover/children/Personalized.vue'
import PrivateContentVue from './children/PrivateContent.vue'
import NewSongsVue from './children/NewSongs.vue'
import RecMVVue from './children/RecMV.vue'
import { onMounted} from 'vue'
import { useDiscover } from '../../../store/discovermusic'
//数据区

//创建仓库实例
const discover = useDiscover()

//数据区


//方法区
onMounted(()=>{
    //获取轮播图数据
    discover.getBanners()

    //获取推荐歌单数据
    discover.getPersonalized()

    //获取独家放送数据
    discover.getPrivateContent()

    //获取最新音乐数据  取出12条数据
    discover.getNewSongList(12)

    //获取推荐mv数据
    discover.getNewMV()
})

</script>

<style lang="scss" scoped>

</style>